<%@ page language="java" contentType="text/html; charset=UTF-8"   pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>浙江移动数据业务精准营运平台</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<jsp:include page="import_ajax.jsp" flush="true" />
<script type='text/javascript' src='<%=path%>/dwr/interface/FunctionTitleHandler.js'></script>
</head>
<style>
	body{
		background-color:#d1dfec
	}
	.waitOnload{display:none;text-align:center;font-size:20px}
</style>
<SCRIPT LANGUAGE="JavaScript">
	var getFrameContent = function(id){
		if(document.all){
			var _e = document.frames[id];
			if(_e!=null)
				return _e.document;
		}else{
			return document.getElementById(id).contentDocument;
		}
	}

	var onFunctionFrameLoad = function(obj){	
		var url = getFrameContent(obj.id).location.href;
		if(url != 'about:blank'){
			FunctionTitleHandler.getFunctionTitle(url,function(title){
				$('#functionTitle').html(title);
			});
		}
		$('#mainframe').show();
		$('.waitOnload').hide();
	}
	var showError = function(obj){
		alert('error');
		obj.src = "about:blank";
	}

</SCRIPT>
<body style="OVERFLOW:HIDDEN;">

<div id="topDiv" style="width:100%;height:80px;background: transparent url('<%=path%>/images/zjyx_logo_bj.gif')">
	<div style="float:left;width:450px"><IMG SRC="<%=path%>/images/zjyx_logo.jpg" ></div>
	<div style="float:right;width:240px">
		<div style="padding-top:20px;vertical-align:middle;color:#ffffff;">
			<IMG SRC="<%=path%>/images/user_head.gif" >
			欢迎<s:property value="#session.QDEVELOP_LOGIN_SESSION_KEY.name"/> 
			<IMG SRC="<%=path%>/images/zjyx_logo_right.gif" height="20px">
			<span style="cursor:hand;" onclick="location.href ='<%=path%>/security/loginOut.action';" title="退出系统">[安全退出]</span>
		</div>
	</div>
</div>

<div id="mainDiv" style="float:center;width:100%;height:467px;padding:3px">
	<div id="MenuDiv" style="float:left;width:240px;height:100%;border:1px solid #8FC2DE;background-color:#ffffff">
		<div style="width:240px;color:#ffffff;background-color:#5895C4;height:20px;padding-top:3px;font-family:'Arial';font-size: 13px;">&nbsp;
		<B>系统功能选项</B></div>
		<iframe src='<%=path%>/menu/menuList.action?index=menu&user=<s:property value="#session.QDEVELOP_LOGIN_SESSION_KEY.loginName"/>' frameborder="0"  width="100%"  height="100%" style="padding:1px;"   scrolling="no" ></iframe>		
		<!-- </div> -->
	</div>
	<div id="FunctionDiv" style="float:right;width:800;height:100%;border:1px solid #8FC2DE;background-color:#ffffff">
		<div style="width:100%;color:#ffffff;background-color:#5895C4;height:20px;padding-left:5px;padding-top:3px;font-family:'Arial';font-size: 13px;" >
		<B><div style="float:left;" id="functionTitle" >功能展示</div></B><div style="float:right;width:80px" id="maxControl">
		放大显示<img src="<%=path%>/images/full.gif"></div></div>
		<iframe src='' frameborder="0" name="mainframe" id="mainframe" scrolling="yes"
		onload="onFunctionFrameLoad(this)" onerror="showError(this);" style="padding-top:1px;width:100%;height:100%"></iframe>
		<div class="waitOnload"><br><img src="<%=path%>/images/loading.gif"/><br><br><B>正在载入,请稍后...</B></div>
	</div>
</div>
<div id="buttomDiv" style="width:100%;text-align:center;color:#25569E;font-size:11px;height:15px">
	CopyRight@2009-2010 北京开拓天际有限公司
</div>
</body>
</html>
<SCRIPT LANGUAGE="JavaScript">
$(function(){
	initMainFrame();
});

var browserVersion = $.browser.version;
var width=$(window).width()+5,	height=$(window).height()-5;

var initMainFrame = function(){
	var disHeight = 20;
	if(browserVersion=='532.3'){
		disHeight = 40;
	}else if(browserVersion=='1.9.1.5'){
		disHeight = 40;
	}
	$('#mainDiv').css({'width':(width-8),'height':(height-140+disHeight)});
	$('#MenuDiv').css({'height':(height-138+disHeight)});
	$('#FunctionDiv').css({'width':(width-259),'height':(height-138+disHeight)});
	$('.waitOnload').css({'width':(width-259),'height':(height-140+disHeight)});
}
var getFunctionWinSize = function(){
	if(browserVersion == '6.0' || browserVersion == '7.0'){
		return {'width':(width-260),'height':(height-120)};
	}else if(browserVersion == '8.0'){
		return {'width':(width-260),'height':(height-120)};
	}else if(browserVersion == '532.3'){
		return {'width':(width-260),'height':(height-122)};
	}else if(browserVersion == '1.9.1.5'){
		return {'width':(width-260),'height':(height-122)};
	}else{
		return {'width':(width-260),'height':(height-122)};
	}

}

var winToMax = function(){
	$('#topDiv').hide();
	$('#MenuDiv').hide();
	//$('#buttomDiv').hide();
	$('#FunctionDiv').hide();
	$('#FunctionDiv').css({'width':(width-8),'height':(height-40)});
	$('#mainframe').css({'width':(width-8),'height':(height-40)});
	$('#FunctionDiv').show('slow');
}

var winTomin = function(){
	$('#topDiv').show();
	$('#MenuDiv').show();
	$('#buttomDiv').show();
	$('#MenuDiv').children('iframe').css({'height':(height-122)});
	$('#MenuDiv').css({'height':(height-140)});
	$('#FunctionDiv').css({'width':(width-260),'height':(height-122)});
	$('#mainframe').css({'width':(width-260),'height':(height-122)});
}

$('#maxControl').click(function(){
	if($(this).html().indexOf('放大显示')>-1){
		$(this).html("缩小显示<img src='<%=path%>/images/fullback.gif'>");
		winToMax();
		setMapSize(width-8,height-40);
	}else{
		$(this).html("放大显示<img src='<%=path%>/images/full.gif'>");
		winTomin();
		setMapSize(width-260,height-122);
	}	
	
});

var setMapSize = function(w,h){
	if(window.frames["mainframe"].reSizeMap){
		window.frames["mainframe"].reSizeMap(w,h);
	}
}

var reLinkMainFrame = function(_url){
	setFrameScoll('yes');
	$('#mainframe').attr('src',_url);
	$('#mainframe').hide();
	$('.waitOnload').show();
}

var setFrameScoll = function(isScoll){
	$('#mainframe').attr('scrolling',isScoll);
}



</SCRIPT>